<?php

/**
 * Platformgroup filter form base class.
 *
 * @package    explications_informatiques
 * @subpackage filter
 * @author     Guimezanes Cyrille
 * @version    SVN: $Id: sfDoctrineFormFilterGeneratedTemplate.php 29570 2010-05-21 14:49:47Z Kris.Wallsmith $
 */
abstract class BasePlatformgroupFormFilter extends BaseFormFilterDoctrine
{
  public function setup()
  {
    $this->setWidgets(array(
      'genre'               => new sfWidgetFormFilterInput(),
      'title_profil_membre' => new sfWidgetFormFilterInput(),
      'nom_champ'           => new sfWidgetFormFilterInput(),
      'nom_groupe'          => new sfWidgetFormFilterInput(),
      'online'              => new sfWidgetFormFilterInput(),
      'ordre'               => new sfWidgetFormFilterInput(),
      'can_be_excluded'     => new sfWidgetFormFilterInput(),
      'type'                => new sfWidgetFormFilterInput(array('with_empty' => false)),
    ));

    $this->setValidators(array(
      'genre'               => new sfValidatorPass(array('required' => false)),
      'title_profil_membre' => new sfValidatorPass(array('required' => false)),
      'nom_champ'           => new sfValidatorPass(array('required' => false)),
      'nom_groupe'          => new sfValidatorPass(array('required' => false)),
      'online'              => new sfValidatorPass(array('required' => false)),
      'ordre'               => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'can_be_excluded'     => new sfValidatorPass(array('required' => false)),
      'type'                => new sfValidatorPass(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('platformgroup_filters[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    $this->setupInheritance();

    parent::setup();
  }

  public function getModelName()
  {
    return 'Platformgroup';
  }

  public function getFields()
  {
    return array(
      'idtable2'            => 'Number',
      'genre'               => 'Text',
      'title_profil_membre' => 'Text',
      'nom_champ'           => 'Text',
      'nom_groupe'          => 'Text',
      'online'              => 'Text',
      'ordre'               => 'Number',
      'can_be_excluded'     => 'Text',
      'type'                => 'Text',
    );
  }
}
